export {}

abstract class Animal {
  eat(food:string):void{
    console.log(`animal${food}`);
  }

  abstract run(distance:number):void //不需要方法体,子类必须实现
}

class Dog extends Animal {
  run(distance:number):void{
    console.log(`animal${distance}`);
  }
}

const a=new Dog();
a.eat('骨头');
a.run(100);